{% extends "base.html" %}
<!-- 页首  here -->
{% block headers %}
{% endblock %}

{% block contend %}

<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <!--<h3 class="box-title"><b>Masq域名列表</b></h3>-->
                <a class="box-title" href="/masq"><b>Masq列表</b></a> /
                <a class="box-title" href="/masq/add"><b>添加域名</b></a>

                <div class="box-tools">
                <div class="input-group input-group-sm" style="width: 150px;">
                <!--<input type="text" name="table_search" class="form-control pull-right" placeholder="Search">-->
                <div class="input-group-btn">
                    <!--<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>-->
                <a href="/masq/update"><button type="submit" class="btn btn-default">一键更新<i class="fa fa-refresh"></i></button></a>
                </div>
                </div>
                </div>
            </div>
            <!-- /.box-header -->

            <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <tr>
                        <th>ID</th>
                        <th>域名</th>
                        <th>IP</th>
                        <th>状态</th>
                        <th>创建时间</th>
                        <th>最近修改时间</th>
                        <th>操作</th>
                    </tr>
                    <!--<tr>-->
                    <!--<td>183</td>-->
                    <!--<td>John Doe</td>-->
                    <!--<td>11-7-2014</td>-->
                    <!--<td><span class="label label-success">Approved</span>-->
                    <!--<span class="label label-primary">Approved</span>-->
                    <!--<span class="label label-warning">Pending</span>-->
                    <!--<span class="label label-danger">Denied</span>-->
                    <!--</td>-->
                    <!--<td>Bacon .</td>-->
                    <!--</tr>-->
                    {% if data%}
                    {% for i in data %}
                    <tr>
                        <td>{{i.get('id')}}</td>
                        <td>{{i.get('domain')}}</td>
                        <td>{{i.get('ip')}}</td>
                        <td>
                            {% if i.get('status')==0 %}
                            <span class="label label-success">启用</span>
                            {% else %}
                            <span class="label label-warning">禁用</span>
                            {% endif %}
                        <td>{{i.get('create_time')}}</td>
                        <td>{{i.get('update_time')}}</td>
                        <td>
                            <a href="/masq/edit?id={{i.get('id')}}"><span class="label label-primary">编辑</span></a>

                            <a href="/masq/action?id={{i.get('id')}}&active=enable"><span
                                    class="label label-success">启用</span></a>
                            <a href="/masq/action?id={{i.get('id')}}&active=disble"><span
                                    class="label label-warning">禁用</span></a>
                            <a href="/masq/action?id={{i.get('id')}}&active=delete"><span
                                    class="label label-danger">删除</span></a>

                        </td>
                    </tr>
                    {%endfor%}
                    {%endif%}

                </table>
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
</div>

{% endblock %}

{% block footerjs %}

{% endblock %}